package com.mudongheng.app.dao.impl;

import com.mudongheng.app.dao.SysUserDao;
import com.mudongheng.app.model.SysUser;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 幕冬
 * @since 2022年03月07日
 */
public class SysUserDaoImpl implements SysUserDao {
    @Override
    public SysUser get() {
        return new SysUser(0, "张三");
    }

    @Override
    public List<SysUser> list() {
        ArrayList<SysUser> sysUsers = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            sysUsers.add(new SysUser(i, "姓名" + i));
        }
        return sysUsers;
    }

    @Override
    public boolean insert(SysUser sysUser) {
        System.out.println("插入用户成功！");
        System.out.println(sysUser);
        return true;
    }

    @Override
    public boolean update(SysUser sysUser) {
        System.out.println("更新用户成功！");
        System.out.println(sysUser);
        return true;
    }

    @Override
    public boolean delete(SysUser sysUser) {
        System.out.println("删除用户成功！");
        System.out.println(sysUser);
        return true;
    }
}
